* to be iterated over, common functionality is defined through these
* macros.
*/
-#define BABL_CLASS_DECLARE(klass) \
- \
-BablDb * babl_##klass##_db (void); \
-Babl * babl_##klass##_from_id (int id); \
-void babl_##klass##_class_for_each (BablEachFunction each_fun, \
+#define BABL_CLASS_DECLARE(klass) \
+ \
+BablDb * babl_##klass##_db (void); \
+const Babl * babl_##klass##_from_id (int id); \
+void babl_##klass##_class_for_each (BablEachFunction each_fun, \
void *user_data)
/* common header for any item inserted into database, the actual
}
-Babl *
+const Babl *
babl_component_new (void *first_arg,
...)
{
if (babl->class_type == BABL_CONVERSION_LINEAR &&
BABL (babl->conversion.source)->class_type == BABL_MODEL)
{
- Babl *src_format = NULL;
- Babl *dst_format = NULL;
+ const Babl *src_format = NULL;
+ const Babl *dst_format = NULL;
if (BABL (babl->conversion.source) == babl_model_from_id (BABL_RGBA))
{
src_format = babl_format_from_id (BABL_RGBA_DOUBLE);
return buf;
}
-Babl *
-babl_conversion_new (void *first_arg,
+const Babl *
+babl_conversion_new (const void *first_arg,
...)
{
va_list varg;
}
long
-babl_conversion_process (Babl *babl,
+babl_conversion_process (const Babl *babl,
const char *source,
char *destination,
long n)
Babl *fmt_source;
Babl *fmt_destination;
- Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
- babl_type ("double"),
- babl_component ("R"),
- babl_component ("G"),
- babl_component ("B"),
- babl_component ("A"),
- NULL);
+ const Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
+ NULL);
double error = 0.0;
long ticks_start = 0;
BABL_CLASS_DECLARE (conversion);
-Babl * babl_conversion (const char *name);
-
-
+const Babl * babl_conversion (const char *name);
/* Signature of functions registered for reference type
* conversions,
* BablExtension objects are only used internally in babl.
*/
-Babl * babl_extension (const char *name);
-void babl_extension_load_dir_list (const char *dir_list);
+const Babl * babl_extension (const char *name);
+void babl_extension_load_dir_list (const char *dir_list);
typedef struct
{
typedef struct _FishPathInstrumentation
{
- Babl *fmt_rgba_double;
+ const Babl *fmt_rgba_double;
double *test;
void *source;
void *destination;
void *ref_destination;
double *destination_rgba_double;
double *ref_destination_rgba_double;
- Babl *fish_rgba_to_source;
- Babl *fish_reference;
- Babl *fish_destination_to_rgba;
+ const Babl *fish_rgba_to_source;
+ const Babl *fish_reference;
+ const Babl *fish_destination_to_rgba;
double reference_cost;
int init_instrumentation_done;
} FishPathInstrumentation;
}
long
-babl_process (Babl *babl,
+babl_process (const Babl *cbabl,
const void *source,
void *destination,
long n)
{
+ Babl *babl = (Babl*)cbabl;
babl_assert (babl);
babl_assert (source);
babl_assert (destination);
#include "babl-internal.h"
static Babl *
-assert_conversion_find (void *source,
- void *destination)
+assert_conversion_find (const void *source,
+ const void *destination)
{
Babl *ret = babl_conversion_find (source, destination);
static int
-process_same_model (Babl *babl,
+process_same_model (const Babl *babl,
const BablImage *source,
BablImage *destination,
long n)
}
long
-babl_fish_reference_process (Babl *babl,
+babl_fish_reference_process (const Babl *babl,
const BablImage *source,
BablImage *destination,
long n)
table_destination_sum_each (Babl *babl,
void *userdata)
{
- Babl *source = userdata;
- Babl *destination = babl;
+ const Babl *source = userdata;
+ const Babl *destination = babl;
if (source != destination)
{
- Babl *fish = babl_fish (source, destination);
+ const Babl *fish = babl_fish (source, destination);
babl_assert (fish);
sum_pixels += fish->fish.pixels;
}
fprintf (output_file, "<td class='cell'> </td>");
else
{
- Babl *fish = babl_fish (source, destination);
+ const Babl *fish = babl_fish (source, destination);
babl_assert (fish);
return id;
}
-Babl *
+const Babl *
babl_fish (const void *source,
const void *destination)
{
BablModel *model,
BablComponent **component,
BablSampling **sampling,
- BablType **type)
+ const BablType **type)
{
Babl *babl;
static char *
-create_name (BablModel *model,
- int components,
- BablComponent **component,
- BablType **type)
+create_name (const BablModel *model,
+ int components,
+ BablComponent **component,
+ const BablType **type)
{
char buf[512] = "";
char *p = &buf[0];
int i;
int same_types = 1;
- BablType **t = type;
- BablType *first_type = *type;
+ const BablType**t = type;
+ const BablType *first_type = *type;
BablComponent **c1 = component;
BablComponent **c2 = model->component;
static char *
-ncomponents_create_name (Babl *type,
- int components)
+ncomponents_create_name (const Babl *type,
+ int components)
{
char buf[512];
sprintf (buf, "%s[%i] ", type->instance.name, components);
}
}
-Babl *
-babl_format_n (Babl *btype,
+const Babl *
+babl_format_n (const Babl *btype,
int components)
{
int i;
BablModel *model = (BablModel *)babl_model ("Y");
BablComponent *component [components];
BablSampling *sampling [components];
- BablType *type [components];
+ const BablType *type [components];
char *name = NULL;
for (i = 0; i<components; i++)
}
int
-babl_format_is_format_n (Babl *format)
+babl_format_is_format_n (const Babl *format)
{
if (format->class_type == BABL_FORMAT)
{
static int
-is_format_duplicate (Babl *babl,
- int planar,
- int components,
- BablModel *model,
- BablComponent **component,
- BablSampling **sampling,
- BablType **type)
+is_format_duplicate (Babl *babl,
+ int planar,
+ int components,
+ BablModel *model,
+ BablComponent **component,
+ BablSampling **sampling,
+ const BablType **type)
{
int i;
return 1;
}
-Babl *
-babl_format_new (void *first_arg,
+const Babl *
+babl_format_new (const void *first_arg,
...)
{
va_list varg;
BablModel *model = NULL;
BablComponent *component [BABL_MAX_COMPONENTS];
BablSampling *sampling [BABL_MAX_COMPONENTS];
- BablType *type [BABL_MAX_COMPONENTS];
+ const BablType*type [BABL_MAX_COMPONENTS];
BablSampling *current_sampling = (BablSampling *) babl_sampling (1, 1);
BablType *current_type = (BablType *) babl_type_from_id (BABL_DOUBLE);
char *name = NULL;
- void *arg = first_arg;
+ const void *arg = first_arg;
va_start (varg, first_arg);
return 0;
}
-Babl *
+const Babl *
babl_format_get_type (const Babl *format,
int component_index)
{
return NULL;
}
-Babl *
-babl_format_with_model_as_type (Babl *model,
- Babl *type)
+const Babl *
+babl_format_with_model_as_type (const Babl *model,
+ const Babl *type)
{
BablComponent *component[10];
int i;
}
double
-babl_format_loss (Babl *babl)
+babl_format_loss (const Babl *babl)
{
double loss = 0.0;
double *test;
void *destination;
double *transformed;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
ref_fmt = babl_format_new (
babl_model ("RGBA"),
babl_free (transformed);
babl_free (test);
- babl->format.loss = loss;
+ ((Babl*)babl)->format.loss = loss;
return loss;
}
void *
-babl_get_user_data (Babl *babl)
+babl_get_user_data (const Babl *babl)
{
switch (babl->instance.class_type)
{
}
void
-babl_set_user_data (Babl *babl, void *data)
+babl_set_user_data (const Babl *cbabl, void *data)
{
- switch (babl->instance.class_type)
+ Babl *babl = (Babl*) cbabl;
+ switch (cbabl->instance.class_type)
{
case BABL_MODEL:
babl->model.data = data;
}
Babl *
-babl_image_from_linear (char *buffer,
- Babl *format)
+babl_image_from_linear (char *buffer,
+ const Babl *cformat)
{
+ Babl *format = (Babl*) cformat;
Babl *babl;
BablModel *model = NULL;
int components = 0;
}
Babl *
-babl_image_new (void *first,
+babl_image_new (const void *first,
...)
{
va_list varg;
* ...]
* NULL);
*/
-Babl * babl_image_new (void *first_component,
+Babl * babl_image_new (const void *first_component,
...) BABL_ARG_NULL_TERMINATED;
typedef struct
const void *destination);
double babl_conversion_error (BablConversion *conversion);
long babl_conversion_cost (BablConversion *conversion);
-long babl_conversion_process (Babl *conversion,
+long babl_conversion_process (const Babl *conversion,
const char *source,
char *destination,
long n);
Babl * babl_extension_quiet_log (void);
void babl_extension_deinit (void);
-long babl_fish_reference_process (Babl *babl,
+long babl_fish_reference_process (const Babl *babl,
const BablImage*source,
BablImage *destination,
long n);
int babl_fish_get_id (const Babl *source,
const Babl *destination);
-double babl_format_loss (Babl *babl);
+double babl_format_loss (const Babl *babl);
Babl * babl_image_from_linear (char *buffer,
- Babl *format);
-Babl * babl_image_double_from_image (Babl *source);
+ const Babl *format);
+Babl * babl_image_double_from_image (const Babl *source);
-double babl_model_is_symmetric (Babl *babl);
+double babl_model_is_symmetric (const Babl *babl);
void babl_die (void);
int babl_sanity (void);
void babl_core_init (void);
-Babl * babl_format_with_model_as_type (Babl *model,
- Babl *type);
+const Babl *babl_format_with_model_as_type (const Babl *model,
+ const Babl *type);
int babl_formats_count (void); /* should maybe be templated? */
-int babl_type_is_symmetric (Babl *babl);
+int babl_type_is_symmetric (const Babl *babl);
/**** LOGGER ****/
#include <stdarg.h>
#define BABL_CLASS_IMPLEMENT(klass) \
BABL_CLASS_MINIMAL_IMPLEMENT(klass) \
\
-Babl * \
+const Babl * \
babl_##klass (const char *name) \
{ \
Babl *babl; \
return babl; \
} \
\
-Babl * \
+const Babl * \
babl_##klass##_from_id (int id) \
{ \
Babl *babl; \
#include "babl-internal.h"
#include "babl-db.h"
-static Babl *construct_double_format (Babl *model);
+static const Babl *construct_double_format (const Babl *model);
static int
babl_model_destroy (void *data)
}
-Babl *
+const Babl *
babl_model_new (void *first_argument,
...)
{
return test;
}
-static Babl *reference_format (void)
+static const Babl *reference_format (void)
{
- static Babl *self = NULL;
+ static const Babl *self = NULL;
if (!self)
self = babl_format_new (
return self;
}
-static Babl *construct_double_format (Babl *model)
+static const Babl *construct_double_format (const Babl *model)
{
- void *argument[44 + 1];
+ const void *argument[44 + 1];
int args = 0;
int i;
}
double
-babl_model_is_symmetric (Babl *babl)
+babl_model_is_symmetric (const Babl *cbabl)
{
+ Babl *babl = (Babl*)cbabl;
double *test;
void *original;
double *clipped;
double *transformed;
int symmetric = 1;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
test = test_create ();
ref_fmt = reference_format ();
} BablPalette;
-static BablPalette *make_pal (Babl *format, void *data, int count)
+static BablPalette *make_pal (const Babl *format, const void *data, int count)
{
BablPalette *pal = NULL;
int bpp = babl_format_get_bytes_per_pixel (format);
/* should return the BablModel, permitting to fetch
* other formats out of it?
*/
-void babl_new_palette (const char *name, Babl **format_u8,
- Babl **format_u8_with_alpha)
+void babl_new_palette (const char *name, const Babl **format_u8,
+ const Babl **format_u8_with_alpha)
{
- Babl *model;
- Babl *model_no_alpha;
- Babl *f_pal_u8;
- Babl *f_pal_a_u8;
+ const Babl *model;
+ const Babl *model_no_alpha;
+ const Babl *f_pal_u8;
+ const Babl *f_pal_a_u8;
BablPalette **palptr;
char cname[64];
}
void
-babl_palette_set_palette (Babl *babl,
- Babl *format,
- void *data,
- int count)
+babl_palette_set_palette (const Babl *babl,
+ const Babl *format,
+ void *data,
+ int count)
{
BablPalette **palptr = babl_get_user_data (babl);
babl_palette_reset (babl);
}
void
-babl_palette_reset (Babl *babl)
+babl_palette_reset (const Babl *babl)
{
BablPalette **palptr = babl_get_user_data (babl);
if (*palptr != default_palette ())
static BablSampling sampling_db[(HORIZONTAL_MAX - HORIZONTAL_MIN + 1) *
(VERTICAL_MAX - VERTICAL_MIN + 1)];
-Babl *
+const Babl *
babl_sampling (int horizontal,
int vertical)
{
return 1;
}
-Babl *
+const Babl *
babl_type_new (void *first_arg,
...)
{
*/
babl_db_insert (db, babl);
return babl;
+
+ if (min || max || is_integer || max_val || min_val)
+ return NULL;
}
}
-static Babl *double_vector_format (void)
+static const Babl *double_vector_format (void)
{
- static Babl *self = NULL;
+ static const Babl *self = NULL;
if (!self)
self = babl_format_new (
}
int
-babl_type_is_symmetric (Babl *babl)
+babl_type_is_symmetric (const Babl *babl)
{
int is_symmetrical = 1;
void *original;
void *destination;
double *transformed;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
test_init (0.0, 182.0);
* Returns the babl object representing the data type given by @name
* such as for example "u8", "u16" or "float".
*/
-Babl * babl_type (const char *name);
+const Babl * babl_type (const char *name);
/**
* Returns the babl object representing the @horizontal and @vertical
* sampling such as for example 2, 2 for the chroma components in
* YCbCr.
*/
-Babl * babl_sampling (int horizontal,
+const Babl * babl_sampling (int horizontal,
int vertical);
/**
* Returns the babl object representing the color component given by
* @name such as for example "R", "cyan" or "CIE L".
*/
-Babl * babl_component (const char *name);
+const Babl * babl_component (const char *name);
/**
* Returns the babl object representing the color model given by @name
* such as for example "RGB", "CMYK" or "CIE Lab".
*/
-Babl * babl_model (const char *name);
+const Babl * babl_model (const char *name);
/**
* Returns the babl object representing the color format given by
* @name such as for example "RGB u8", "CMYK float" or "CIE Lab u16".
*/
-Babl * babl_format (const char *name);
+const Babl * babl_format (const char *name);
/* Create a babl fish capable of converting from source_format to
* destination_format, source and destination can be either strings
* with the names of the formats or Babl-format objects.
*/
-Babl * babl_fish (const void *source_format,
+const Babl * babl_fish (const void *source_format,
const void *destination_format);
/** Process n pixels from source to destination using babl_fish,
* returns number of pixels converted.
*/
-long babl_process (Babl *babl_fish,
+long babl_process (const Babl *babl_fish,
const void *source,
void *destination,
long n);
* Returns the type in the given @format for the given
* @component_index.
*/
-Babl * babl_format_get_type (const Babl *format,
+const Babl * babl_format_get_type (const Babl *format,
int component_index);
* ["max_val", double max_val,]
* NULL);
*/
-Babl * babl_type_new (void *first_arg,
+const Babl * babl_type_new (void *first_arg,
...) BABL_ARG_NULL_TERMINATED;
/**
* babl_component_new (const char *name,
* NULL);
*/
-Babl * babl_component_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_component_new (void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
/**
* Defines a new color model in babl. If no name is provided a name is
* [BablComponent *componentN, ...]
* NULL);
*/
-Babl * babl_model_new (void *first_arg,
+const Babl * babl_model_new (void *first_arg,
...) BABL_ARG_NULL_TERMINATED;
/**
* ["planar",]
* NULL);
*/
-Babl * babl_format_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_format_new (const void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
/*
* Defines a new pixel format in babl. With the specified data storage
* conversions are only well defined to other babl_format_n derived formats
* with the same number of components.
*/
-Babl *
-babl_format_n (Babl *type,
+const Babl *
+babl_format_n (const Babl *type,
int components);
/**
* Returns whether the @format is a format_n type.
*/
-int babl_format_is_format_n (Babl *format);
+int babl_format_is_format_n (const Babl *format);
/**
* Defines a new conversion between either two formats, two models or
* <"linear"|"planar">, <BablFuncLinear | BablFuncPlanar> conv_func,
* NULL);
*/
-Babl * babl_conversion_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_conversion_new (const void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
/**
* create a new palette based format, name is optional pass in NULL to get
* an anonymous format. If you pass in with_alpha the format also gets
* an 8bit alpha channel.
*/
-void babl_new_palette (const char *name, Babl **format_u8,
- Babl **format_u8_with_alpha);
+void babl_new_palette (const char *name, const Babl **format_u8,
+ const Babl **format_u8_with_alpha);
/**
* Assign a palette to a palette format, the data is a single span of pixels
* representing the colors of the palette.
*/
-void babl_palette_set_palette (Babl *babl,
- Babl *format,
+void babl_palette_set_palette (const Babl *babl,
+ const Babl *format,
void *data,
int count);
/**
* reset a palette to initial state.
*/
-void babl_palette_reset (Babl *babl);
+void babl_palette_reset (const Babl *babl);
/**
* used from the conversion functions, encoding color profiles, palettes or
* similar with the data.
*/
-void babl_set_user_data (Babl *babl, void *data);
+void babl_set_user_data (const Babl *babl, void *data);
/**
* get data set with babl_set_user_data
*/
-void * babl_get_user_data (Babl *babl);
+void * babl_get_user_data (const Babl *babl);
int
init (void)
{
- Babl *rgbaF = babl_format_new (
+ const Babl *rgbaF = babl_format_new (
babl_model ("RGBA"),
babl_type ("float"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgbAF = babl_format_new (
+ const Babl *rgbAF = babl_format_new (
babl_model ("RaGaBaA"),
babl_type ("float"),
babl_component ("Ra"),
babl_component ("A"),
NULL);
- Babl *lrgba8 = babl_format_new (
+ const Babl *lrgba8 = babl_format_new (
babl_model ("RGBA"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("A"),
NULL);
- Babl *rgba8 = babl_format_new (
+ const Babl *rgba8 = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *bgrA8 = babl_format_new (
+ const Babl *bgrA8 = babl_format_new (
"name", "B'aG'aR'aA u8",
babl_model ("R'aG'aB'aA"),
babl_type ("u8"),
babl_component ("R'a"),
babl_component ("A"),
NULL);
- Babl *rgb8 = babl_format_new (
+ const Babl *rgb8 = babl_format_new (
babl_model ("R'G'B'"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("G'"),
babl_component ("B'"),
NULL);
- Babl *sdl32 = babl_format_new (
+ const Babl *sdl32 = babl_format_new (
"name", "B'aG'aR'aPAD u8",
babl_model ("R'G'B'"),
babl_type ("u8"),
int
init (void)
{
- Babl *rgbaF = babl_format_new (
+ const Babl *rgbaF = babl_format_new (
babl_model ("RGBA"),
babl_type ("float"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgba16 = babl_format_new (
+ const Babl *rgba16 = babl_format_new (
babl_model ("RGBA"),
babl_type ("u16"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgbaD = babl_format_new (
+ const Babl *rgbaD = babl_format_new (
babl_model ("RGBA"),
babl_type ("double"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgba8 = babl_format_new (
+ const Babl *rgba8 = babl_format_new (
babl_model ("RGBA"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgbAF = babl_format_new (
+ const Babl *rgbAF = babl_format_new (
babl_model ("RaGaBaA"),
babl_type ("float"),
babl_component ("Ra"),
babl_component ("Ba"),
babl_component ("A"),
NULL);
- Babl *rgbA16 = babl_format_new (
+ const Babl *rgbA16 = babl_format_new (
babl_model ("RaGaBaA"),
babl_type ("u16"),
babl_component ("Ra"),
babl_component ("Ba"),
babl_component ("A"),
NULL);
- Babl *rgbA8 = babl_format_new (
+ const Babl *rgbA8 = babl_format_new (
babl_model ("RaGaBaA"),
babl_type ("u8"),
babl_component ("Ra"),
babl_component ("Ba"),
babl_component ("A"),
NULL);
- Babl *rgbF = babl_format_new (
+ const Babl *rgbF = babl_format_new (
babl_model ("RGB"),
babl_type ("float"),
babl_component ("R"),
babl_component ("G"),
babl_component ("B"),
NULL);
- Babl *rgb16 = babl_format_new (
+ const Babl *rgb16 = babl_format_new (
babl_model ("RGB"),
babl_type ("u16"),
babl_component ("R"),
babl_component ("G"),
babl_component ("B"),
NULL);
- Babl *rgb8 = babl_format_new (
+ const Babl *rgb8 = babl_format_new (
babl_model ("RGB"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("G"),
babl_component ("B"),
NULL);
- Babl *gaF = babl_format_new (
+ const Babl *gaF = babl_format_new (
babl_model ("YA"),
babl_type ("float"),
babl_component ("Y"),
babl_component ("A"),
NULL);
- Babl *gAF = babl_format_new (
+ const Babl *gAF = babl_format_new (
babl_model ("YaA"),
babl_type ("float"),
babl_component ("Ya"),
babl_component ("A"),
NULL);
- Babl *gF = babl_format_new (
+ const Babl *gF = babl_format_new (
babl_model ("Y"),
babl_type ("float"),
babl_component ("Y"),
NULL);
- Babl *ga16 = babl_format_new (
+ const Babl *ga16 = babl_format_new (
babl_model ("YA"),
babl_type ("u16"),
babl_component ("Y"),
babl_component ("A"),
NULL);
- Babl *gA16 = babl_format_new (
+ const Babl *gA16 = babl_format_new (
babl_model ("YaA"),
babl_type ("u16"),
babl_component ("Ya"),
babl_component ("A"),
NULL);
- Babl *g16 = babl_format_new (
+ const Babl *g16 = babl_format_new (
babl_model ("Y"),
babl_type ("u16"),
babl_component ("Y"),
NULL);
- Babl *ga8 = babl_format_new (
+ const Babl *ga8 = babl_format_new (
babl_model ("YA"),
babl_type ("u8"),
babl_component ("Y"),
babl_component ("A"),
NULL);
- Babl *gA8 = babl_format_new (
+ const Babl *gA8 = babl_format_new (
babl_model ("YaA"),
babl_type ("u8"),
babl_component ("Ya"),
babl_component ("A"),
NULL);
- Babl *g8 = babl_format_new (
+ const Babl *g8 = babl_format_new (
babl_model ("Y"),
babl_type ("u8"),
babl_component ("Y"),
NULL);
- Babl *yuv8 = babl_format_new (
+ const Babl *yuv8 = babl_format_new (
"name", "Y'CbCr u8",
"planar",
babl_model ("Y'CbCr"),
babl_component ("Cb"),
babl_component ("Cr"),
NULL);
- Babl *yuvF = babl_format_new (
+ const Babl *yuvF = babl_format_new (
babl_model ("Y'CbCr"),
babl_type ("float"),
babl_component ("Y'"),
babl_component ("Cb"),
babl_component ("Cr"),
NULL);
- Babl *yuvaF = babl_format_new (
+ const Babl *yuvaF = babl_format_new (
babl_model ("Y'CbCrA"),
babl_type ("float"),
babl_component ("Y'"),
int
init (void)
{
- Babl *rgbaD = babl_format_new (
+ const Babl *rgbaD = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("double"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *rgbaF = babl_format_new (
+ const Babl *rgbaF = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("float"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *rgba16 = babl_format_new (
+ const Babl *rgba16 = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("u16"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *rgba8 = babl_format_new (
+ const Babl *rgba8 = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *rgbAF = babl_format_new (
+ const Babl *rgbAF = babl_format_new (
babl_model ("R'aG'aB'aA"),
babl_type ("float"),
babl_component ("R'a"),
babl_component ("B'a"),
babl_component ("A"),
NULL);
- Babl *rgbA16 = babl_format_new (
+ const Babl *rgbA16 = babl_format_new (
babl_model ("R'aG'aB'aA"),
babl_type ("u16"),
babl_component ("R'a"),
babl_component ("B'a"),
babl_component ("A"),
NULL);
- Babl *rgbA8 = babl_format_new (
+ const Babl *rgbA8 = babl_format_new (
babl_model ("R'aG'aB'aA"),
babl_type ("u8"),
babl_component ("R'a"),
babl_component ("B'a"),
babl_component ("A"),
NULL);
- Babl *rgbF = babl_format_new (
+ const Babl *rgbF = babl_format_new (
babl_model ("R'G'B'"),
babl_type ("float"),
babl_component ("R'"),
babl_component ("G'"),
babl_component ("B'"),
NULL);
- Babl *rgb16 = babl_format_new (
+ const Babl *rgb16 = babl_format_new (
babl_model ("R'G'B'"),
babl_type ("u16"),
babl_component ("R'"),
babl_component ("G'"),
babl_component ("B'"),
NULL);
- Babl *rgb8 = babl_format_new (
+ const Babl *rgb8 = babl_format_new (
babl_model ("R'G'B'"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("G'"),
babl_component ("B'"),
NULL);
- Babl *gaF = babl_format_new (
+ const Babl *gaF = babl_format_new (
babl_model ("Y'A"),
babl_type ("float"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
- Babl *gAF = babl_format_new (
+ const Babl *gAF = babl_format_new (
babl_model ("Y'aA"),
babl_type ("float"),
babl_component ("Y'a"),
babl_component ("A"),
NULL);
- Babl *gF = babl_format_new (
+ const Babl *gF = babl_format_new (
babl_model ("Y'"),
babl_type ("float"),
babl_component ("Y'"),
NULL);
- Babl *ga16 = babl_format_new (
+ const Babl *ga16 = babl_format_new (
babl_model ("Y'A"),
babl_type ("u16"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
- Babl *gA16 = babl_format_new (
+ const Babl *gA16 = babl_format_new (
babl_model ("Y'aA"),
babl_type ("u16"),
babl_component ("Y'a"),
babl_component ("A"),
NULL);
- Babl *g16 = babl_format_new (
+ const Babl *g16 = babl_format_new (
babl_model ("Y'"),
babl_type ("u16"),
babl_component ("Y'"),
NULL);
- Babl *ga8 = babl_format_new (
+ const Babl *ga8 = babl_format_new (
babl_model ("Y'A"),
babl_type ("u8"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
- Babl *gA8 = babl_format_new (
+ const Babl *gA8 = babl_format_new (
babl_model ("Y'aA"),
babl_type ("u8"),
babl_component ("Y'a"),
babl_component ("A"),
NULL);
- Babl *g8 = babl_format_new (
+ const Babl *g8 = babl_format_new (
babl_model ("Y'"),
babl_type ("u8"),
babl_component ("Y'"),
NULL);
- Babl *yuvF = babl_format_new (
+ const Babl *yuvF = babl_format_new (
babl_model ("Y'CbCr"),
babl_type ("float"),
babl_component ("Y'"),
babl_component ("Cb"),
babl_component ("Cr"),
NULL);
- Babl *yuvaF = babl_format_new (
+ const Babl *yuvaF = babl_format_new (
babl_model ("Y'CbCrA"),
babl_type ("float"),
babl_component ("Y'"),
int
init (void)
{
- Babl *ragabaaF_linear = babl_format_new (
+ const Babl *ragabaaF_linear = babl_format_new (
babl_model ("RaGaBaA"),
babl_type ("float"),
babl_component ("Ra"),
babl_component ("Ba"),
babl_component ("A"),
NULL);
- Babl *rgbaF_linear = babl_format_new (
+ const Babl *rgbaF_linear = babl_format_new (
babl_model ("RGBA"),
babl_type ("float"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgba8_linear = babl_format_new (
+ const Babl *rgba8_linear = babl_format_new (
babl_model ("RGBA"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgba8_gamma_2_2 = babl_format_new (
+ const Babl *rgba8_gamma_2_2 = babl_format_new (
babl_model ("R'G'B'A"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("B'"),
babl_component ("A"),
NULL);
- Babl *rgbF_linear = babl_format_new (
+ const Babl *rgbF_linear = babl_format_new (
babl_model ("RGB"),
babl_type ("float"),
babl_component ("R"),
babl_component ("G"),
babl_component ("B"),
NULL);
- Babl *rgb8_linear = babl_format_new (
+ const Babl *rgb8_linear = babl_format_new (
babl_model ("RGB"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("G"),
babl_component ("B"),
NULL);
- Babl *rgb8_gamma_2_2 = babl_format_new (
+ const Babl *rgb8_gamma_2_2 = babl_format_new (
babl_model ("R'G'B'"),
babl_type ("u8"),
babl_component ("R'"),
babl_component ("G'"),
babl_component ("B'"),
NULL);
- Babl *gaF_linear = babl_format_new (
+ const Babl *gaF_linear = babl_format_new (
babl_model ("YA"),
babl_type ("float"),
babl_component ("Y"),
babl_component ("A"),
NULL);
- Babl *ga8_linear = babl_format_new (
+ const Babl *ga8_linear = babl_format_new (
babl_model ("YA"),
babl_type ("u8"),
babl_component ("Y"),
babl_component ("A"),
NULL);
- Babl *ga8_gamma_2_2 = babl_format_new (
+ const Babl *ga8_gamma_2_2 = babl_format_new (
babl_model ("Y'A"),
babl_type ("u8"),
babl_component ("Y'"),
babl_component ("A"),
NULL);
- Babl *gF_linear = babl_format_new (
+ const Babl *gF_linear = babl_format_new (
babl_model ("Y"),
babl_type ("float"),
babl_component ("Y"),
NULL);
- Babl *g8_linear = babl_format_new (
+ const Babl *g8_linear = babl_format_new (
babl_model ("Y"),
babl_type ("u8"),
babl_component ("Y"),
NULL);
- Babl *g8_gamma_2_2 = babl_format_new (
+ const Babl *g8_gamma_2_2 = babl_format_new (
babl_model ("Y'"),
babl_type ("u8"),
babl_component ("Y'"),
{
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
- Babl *rgbaF_linear = babl_format_new (
+ const Babl *rgbaF_linear = babl_format_new (
babl_model ("RGBA"),
babl_type ("float"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgba8_linear = babl_format_new (
+ const Babl *rgba8_linear = babl_format_new (
babl_model ("RGBA"),
babl_type ("u8"),
babl_component ("R"),
babl_component ("B"),
babl_component ("A"),
NULL);
- Babl *rgb8_linear = babl_format_new (
+ const Babl *rgb8_linear = babl_format_new (
babl_model ("RGB"),
babl_type ("u8"),
babl_component ("R"),